<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>完善用户信息</title>

<link href="<%=request.getContextPath() %>/js/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="<%=request.getContextPath() %>/page/login/signin.css" rel="stylesheet">
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.2.min.js"></script>
</head>

<body>

	<div class="signin">
		<div class="signin-head">
			<img src="${headurl}" alt="" class="img-circle">
		</div>
		<form id="addForm" class="form-signin" role="form">
			<input type="text" class="form-control" placeholder="手机" required 
				autofocus name="phone" /> 
			<input type="text" class="form-control"
				placeholder="邮箱" required name="email" />
			<input type="hidden" value="${social_uid}" name="socialUid" />
			<input type="hidden" value="${username}" name="nickname" />
			<button class="btn btn-lg btn-success btn-block" type="button" onclick="formSubmit()">提交</button>		
		</form>
	</div>
	
	
	
<script type="text/javascript">
   
  function formSubmit(){
	
	    $.ajax({
	    	url:"/user/addUser.action",
	    	type:"post",
	    	data:$("#addForm").serialize(),
	    	success:function(obj){
	    		if(obj){
	    			location.href="/index.jsp";
	    		} else {
	    			alert("信息导入有误!!");
	    		}
	    	},
	    	dataType:"json"
	    });  
   }
   
</script>

</body>
</html>